package com.tanhua.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tanhua.api.UserInfoApi;
import com.tanhua.mapper.UserInfoMapper;
import com.tanhua.model.pojo.UserInfo;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author: JW
 * @Description: TODO
 * @DateTime: 2021/12/21 22:11
 **/

@DubboService
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoApi {

    @Autowired
    private UserInfoMapper userInfoMapper;


    @Override
    public UserInfo findById(Long id) {

        return userInfoMapper.selectById(id);
    }

    @Override
    public void update(UserInfo userInfo) {

        userInfoMapper.updateById(userInfo);
    }

    @Override
    public void saveUserInfo(UserInfo userInfo) {
        userInfoMapper.insert(userInfo);
    }


}
